package devkit.commando {
	
	/**
	 * Class that manages all of the setups and services of the commando library.
	 * @author Francois Dempers
	 */
	public class CommandManager {
		
		/** List of commands currently being fired off. */
		[Bindable] public static var processChain:ProcessChain = new ProcessChain();
		
		/** List of commands that has failed while executing. */
		[Bindable] public static var errorChain:ErrorChain = new ErrorChain();
		
		/**
		 * Initializes the <code>CommandManager</code>. 
		 * @param errorHandler The function to invoke should and error occur in any of the commands (global error handler).
		 */
		public static function init(errorHandler:Function=null):void {
			
			errorChain.handler = errorHandler;
		}
	}
}